
//
//  YPMakeURL.m
//  网络请求_WYP_测试
//
//  Created by lanou3g on 15/12/15.
//  Copyright © 2015年 王艳苹. All rights reserved.
//

#import "YPMakeURL.h"
static YPMakeURL *url = nil;
@implementation YPMakeURL

+ (instancetype)shareMakeURL{
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        url = [[YPMakeURL alloc]init];
    });
    return url;
}
//轮播图和精选
- (NSString *)homePageHeaderURL{
    if (_homePageHeaderURL == nil) {
        _homePageHeaderURL = @"http://api2.pianke.me/pub/today";
    }
    return _homePageHeaderURL;
}
//轮播图
- (NSDictionary *)homePageParameterWheelDic{
    if (_homePageParameterWheelDic == nil) {
        _homePageParameterWheelDic = @{@"start": @"0",@"client": @"2",@"auth": @"C8Rm1F32zofhDC8lwEMHrlDJxQML5MOTcp2tvCjBjcWP22NdPTB9Y6P8",@"limit": @"14"};
    }
    return _homePageParameterWheelDic;
}
//精选
- (NSDictionary *)homePageParameterSelectDic{
    if (_homePageParameterSelectDic == nil) {
        _homePageParameterSelectDic = @{@"start": @"0",@"client": @"2",@"auth": @"C8Rm1F32zofhDC8lwEMHrlDJxQML5MOTcp2tvCjBjcWP22NdPTB9Y6P8",@"limit": @"10"};
    }
    return _homePageParameterSelectDic;
}
- (NSDictionary*)makeDwonFreashDicWithNum:(NSInteger)num{
    NSString *str = [NSString stringWithFormat:@"%ld",(long)num];
    NSDictionary *dict = @{@"start":str,@"client": @"2",@"auth": @"C8Rm1F32zofhDC8lwEMHrlDJxQML5MOTcp2tvCjBjcWP22NdPTB9Y6P8",@"limit": @"10"};
    return dict;
}
//动态
-(NSString *)homePageDynamicHeaderURL{
    if (_homePageDynamicHeaderURL == nil) {
        _homePageDynamicHeaderURL = @"http://api2.pianke.me/user/feed";
    }
    return _homePageDynamicHeaderURL;
}
- (NSDictionary *)homePageParameterDynamicDic{
    if (_homePageParameterDynamicDic == nil) {
        _homePageParameterDynamicDic = @{@"start": @"0",@"client": @"2",@"auth": @"C8Rm1F32zofhDC8lwEMHrlDJxQML5MOTcp2tvCjBjcWP22NdPTB9Y6P8",@"limit": @"10"};
    }
    return _homePageParameterDynamicDic;
}
- (NSDictionary*)makeDynamicDownFreashDicWithNum:(NSInteger)num{
    
    NSString *str = [NSString stringWithFormat:@"%ld",(long)num];
    NSDictionary *dict = @{@"start":str,@"client": @"2",@"auth": @"C8Rm1F32zofhDC8lwEMHrlDJxQML5MOTcp2tvCjBjcWP22NdPTB9Y6P8",@"limit": @"10"};
    return dict;
}
//碎片
- (NSString *)homePageFragmentHeaderURL{
    if (_homePageFragmentHeaderURL == nil) {
        _homePageFragmentHeaderURL = @"http://api2.pianke.me/timeline/list";
    }
    return _homePageFragmentHeaderURL;
}
- (NSDictionary *)homePageParameterFragmentDic{
    if (_homePageParameterFragmentDic == nil) {
        _homePageParameterFragmentDic = @{@"start": @"0",@"client": @"2",@"auth": @"C8Rm1F32zofhDC8lwEMHrlDJxQML5MOTcp2tvCjBjcWP22NdPTB9Y6P8",@"limit": @"12"};
    }
    return _homePageParameterFragmentDic;
}
- (NSDictionary*)makePageParameterFragmentDicWithNum:(NSInteger)num{
    NSString *str = [NSString stringWithFormat:@"%ld",(long)num];
    NSDictionary *dic = @{@"start":str,@"client": @"2",@"auth": @"C8Rm1F32zofhDC8lwEMHrlDJxQML5MOTcp2tvCjBjcWP22NdPTB9Y6P8",@"limit": @"12"};
    return dic;
}

- (NSString *)radioDitailURL{
    if (_radioDitailURL == nil) {
        _radioDitailURL = @"http://api2.pianke.me/ting/radio_detail";
    }
    return _radioDitailURL;
}
//Radio详情的字典
-(NSDictionary*)makeRadioDitailDicWithRadioID:(NSInteger)radioID{
    NSString *radioid = [NSString stringWithFormat:@"%ld",(long)radioID];
     _radioDitailDic = @{@"radioid":radioid,@"start":@"0",@"client": @"2",@"auth":@"2&auth=C8Rm1F32zofhDC8lwEMHrlDJxQML5MOTcp2tvCjBjcWP22NdPTB9Y6P8",@"limit":@"10"};
    return _radioDitailDic;
}

- (NSDictionary*)makeRadioDitailListDicWithString:(NSString *)radioID{
    _radioDitailListDic = @{@"radioid":radioID,@"start":@"0",@"client": @"2",@"auth":@"2&auth=C8Rm1F32zofhDC8lwEMHrlDJxQML5MOTcp2tvCjBjcWP22NdPTB9Y6P8",@"limit":@"10"};
    return _radioDitailListDic;
}
- (NSDictionary*)makeRadioDitailListWithRadio:(NSString*)randioId and:(NSInteger)num{
    NSString *str = [NSString stringWithFormat:@"%ld",(long)num];
    NSDictionary *dic = @{@"radioid":randioId,@"start":str,@"client": @"2",@"auth":@"2&auth=C8Rm1F32zofhDC8lwEMHrlDJxQML5MOTcp2tvCjBjcWP22NdPTB9Y6P8",@"limit":@"10"};
    return dic;
}
- (NSString *)radioURL{
    if (_radioURL == nil) {
        _radioURL = @"http://api2.pianke.me/ting/radio";
    }
    return _radioURL;
}

- (NSString *)radioListURL{
    if (_radioListURL == nil) {
        _radioListURL = @"http://api2.pianke.me/ting/radio_list";
    }
    return _radioListURL;
}
//Radio字典
- (NSDictionary *)radioWheelDic{
    if (_radioWheelDic == nil) {
        _radioWheelDic = @{@"client": @"2",@"auth":@"C8Rm1F32zofhDC8lwEMHrlDJxQML5MOTcp2tvCjBjcWP22NdPTB9Y6P8"};
    }
    return _radioWheelDic;
}
- (NSDictionary *)radioHotListDic{
    if (_radioHotListDic == nil) {
        _radioHotListDic =   @{@"client": @"2",@"auth":@"C8Rm1F32zofhDC8lwEMHrlDJxQML5MOTcp2tvCjBjcWP22NdPTB9Y6P8"};
    }
    return _radioHotListDic;
}
- (NSDictionary*)radioBottomListDic{
    if (_radioBottomListDic == nil) {
        _radioBottomListDic = @{@"client": @"2",@"auth":@"C8Rm1F32zofhDC8lwEMHrlDJxQML5MOTcp2tvCjBjcWP22NdPTB9Y6P8"};
    }
    return _radioBottomListDic;
}
- (NSDictionary*)makeRadioAllListDicWithRadioId:(NSInteger)radioID{
    NSString *radioid = [NSString stringWithFormat:@"%ld",(long)radioID];
    _radioListDic =  @{@"start":radioid,@"client": @"2",@"auth":@"C8Rm1F32zofhDC8lwEMHrlDJxQML5MOTcp2tvCjBjcWP22NdPTB9Y6P8",@"limit":@"9"};
    return _radioListDic;
}
//歌曲解析
- (NSString *)songURL{
    if (_songURL == nil) {
        _songURL = @"http://api2.pianke.me/ting/info";
    }
    return _songURL;
}
- (NSDictionary *)makeSongDictWithSongID:(NSString *)songid{
    NSDictionary *dic =  @{@"tingid":songid,@"client": @"2",@"auth":@"C8Rm1F32zofhDC8lwEMHrlDJxQML5MOTcp2tvCjBjcWP22NdPTB9Y6P8"};
    return dic;
}
//readURL
- (NSString *)readURL{
    if (_readURL == nil) {
        _readURL = @"http://api2.pianke.me/read/columns";
    }
    return _readURL;
}
- (NSString *)readDetailURL{
    if (_readDetailURL == nil) {
        _readDetailURL = @"http://api2.pianke.me/read/columns_detail";
    }
    return _readDetailURL;
}
- (NSDictionary *)readWheelDic{
    if (_readWheelDic == nil) {
        _readWheelDic =  @{@"client": @"2",@"CC8Rm1F32zofhDC8lwEMHrlDJxQML5MOTcp2tvCjBjcWP22NdPTB9Y6P8": @"auth"};
    }
    return _readWheelDic;
}
- (NSDictionary *)readNineDic{
    if (_readNineDic == nil) {
        _readNineDic =  @{@"client": @"2",@"CC8Rm1F32zofhDC8lwEMHrlDJxQML5MOTcp2tvCjBjcWP22NdPTB9Y6P8": @"auth"};
    }
    return _readNineDic;
}
- (NSDictionary*)makeReadDetailDicWithStr:(NSString*)str num1:(NSInteger)num1 num2:(NSInteger)num2{
    NSString *str1 = [NSString stringWithFormat:@"%ld",(long)num1];
    NSString *str2 = [NSString stringWithFormat:@"%ld",(long)num2];
    _readDetailDic = @{@"sort":str,@"start":str1,@"typeid":str2,@"client": @"2",@"C8Rm1F32zofhDC8lwEMHrlDJxQML5MOTcp2tvCjBjcWP22NdPTB9Y6P8": @"auth",@"limit": @"10"};
    return _readDetailDic;
}
/**
 *  话题
 */
- (NSString *)topicURL{
    if (_topicURL == nil) {
        _topicURL = @"http://api2.pianke.me/group/posts_hotlist";
    }
    return _topicURL;
}
- (NSDictionary *)makeTopicDicWithStr:(NSString*)str num:(NSInteger)num{
    NSString *str1 = [NSString stringWithFormat:@"%ld",(long)num];
    _topicDic =  @{@"sort":str,@"start":str1,@"client": @"2",@"C8Rm1F32zofhDC8lwEMHrlDJxQML5MOTcp2tvCjBjcWP22NdPTB9Y6P8": @"auth",@"limit": @"10"};
    return _topicDic;
}
/**
 *  良品
 */
- (NSString *)shopURL{
    if (_shopURL == nil) {
        _shopURL = @"http://api2.pianke.me/pub/shop";
    }
    return _shopURL;
}

- (NSDictionary *)shopDic{
    if (_shopDic == nil) {
        _shopDic =  @{@"start":@"0",@"client": @"2",@"auth":@"C8Rm1F32zofhDC8lwEMHrlDJxQML5MOTcp2tvCjBjcWP22NdPTB9Y6P8",@"limit":@"10"};
    }
    return _shopDic;
}

- (NSDictionary *)makeShopDetailDicWithNum:(NSInteger)num{
    NSString *str = [NSString stringWithFormat:@"%ld",(long)num];
    _shopDetailDic = @{@"start":str,@"client": @"2",@"auth":@"C8Rm1F32zofhDC8lwEMHrlDJxQML5MOTcp2tvCjBjcWP22NdPTB9Y6P8",@"limit":@"10"};
    return _shopDetailDic;
}
/**
 *  user
 */
- (NSString *)userURL{
    if (_userURL == nil) {
        _userURL = @"http://api2.pianke.me/profile/info";
    }
    return _userURL;
}
- (NSDictionary *)makeUserDicWithUid:(NSInteger)uid{
    NSString *str = [NSString stringWithFormat:@"%ld",(long)uid];
    NSDictionary *dic = @{@"uid":str,@"client": @"2",@"auth":@"XcdoQyq18q5DC8lwEMHrlDJxQML9MeTboD9vWGZicWP22NdISB1b7fw"};
    return dic;
}
@end
